From: Florian Eckert Date: Thu, 6 Mar 2025 09:31:37 +0000 (+0100) Subject: luci-theme-material: update cascade.css to use first-of-type instead of last/first... X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=47d26bcb62e8e7104f244320d80e6dc30ed804ba;p=project%2Fluci.git luci-theme-material: update cascade.css to use first-of-type instead of last/first-child first-child: Selects an element that is the first child of its parent. The element must be the very first child of its parent, regardless of its type. first-of-type: Selects the first element of its type among its siblings. The element must be the first of its type (e.g.,

,

, etc.) within its parent, but it does *not* have to be the first child. Makes the CSS usage more robust if the layout changes and new html elements are added. Signed-off-by: Florian Eckert --- diff --git a/themes/luci-theme-material/htdocs/luci-static/material/cascade.css b/themes/luci-theme-material/htdocs/luci-static/material/cascade.css index ad29f36911..f6ddb74c4d 100644 --- a/themes/luci-theme-material/htdocs/luci-static/material/cascade.css +++ b/themes/luci-theme-material/htdocs/luci-static/material/cascade.css @@ -1786,11 +1786,11 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child { justify-content: space-between; } -.modal .button-row > :not(:last-child) { +.modal .button-row > button:not(:first-of-type) { margin-right: .5em; } -.modal .button-row > :first-child { +.modal .button-row > button:first-of-type { margin-right: auto; }